<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'PostController@index');

Route::get('post/show/{id}', 'PostController@show');
Route::get('post/create', 'PostController@create');
Route::post('post/create', 'PostController@createPost');

Route::get('register', 'UserController@register');
Route::post('register', 'UserController@registerPost');
Route::get('login', 'UserController@login')->name('login');
Route::post('login', 'UserController@loginPost');
Route::get('logout', 'UserController@logout');
Route::get('user/avatar', 'UserController@avatar');
Route::post('user/avatar', 'UserController@avatarPost');

Route::get('verify/{code}','UserController@confirmEmail');

Route::post('comment/create','CommentController@createPost');
